<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script type="text/javascript">
        var grade = prompt('请输入分数')
        var g = parseInt(grade / 10)
        if (g == 10 || g == 9) {
            alert('你的成绩等级为优秀')
        } else if (g == 8 || g == 7 || g == 6) {
            alert('你的成绩等级为良好')
        } else {
            alert('你的成绩等级为不合格,继续加油哦!')
        }
    </script>

</body>

</html>